import request from '@/utils/request'

// 查询委托代办列表
export function listWfEntrustTask(query) {
  return request({
    url: '/entrust/wfEntrustTask/list',
    method: 'get',
    params: query
  })
}

// 查询委托代办详细
export function getWfEntrustTask(id) {
  return request({
    url: '/entrust/wfEntrustTask/' + id,
    method: 'get'
  })
}

// 保存委托代办
export function saveWfEntrustTask(data) {
  return request({
    url: '/entrust/wfEntrustTask/save',
    method: 'post',
    data: data
  })
}

// 删除委托代办
export function delWfEntrustTask(id) {
  return request({
    url: '/entrust/wfEntrustTask/' + id,
    method: 'delete'
  })
}

// 导出委托代办
export function exportWfEntrustTask(query) {
  return request({
    url: '/entrust/wfEntrustTask/export',
    method: 'get',
    params: query
  })
}

// 被委托人状态修改
export function changeUserStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/entrust/wfEntrustTask/changeStatus',
    method: 'put',
    data: data
  })
}

